import request from '@/config/axios'

export interface BrokerageWithdrawVO {
  id: number
  no: string
  userId: number
  activeNo: string
  activeName: string
  applyReason: string
  applyDescription: string
  applyPicUrls: string
  orderNo: string
  auditTime: Date
  auditUserId: number
  auditReason: string
  payRefundId: number
  refundTime: Date
  type: number
  status: number
  orderId: number
  refundPrice: number
}

// 查询相亲佣金提现列表
export const getBrokerageWithdrawPage = async (params) => {
  return await request.get({ url: `/order/brokerage-withdraw/page`, params })
}

// 查询相亲佣金提现详情
export const getBrokerageWithdraw = async (id: number) => {
  return await request.get({ url: `/order/brokerage-withdraw/get?id=` + id })
}

// 新增相亲佣金提现
export const createBrokerageWithdraw = async (data: BrokerageWithdrawVO) => {
  return await request.post({ url: `/order/brokerage-withdraw/create`, data })
}

// 修改相亲佣金提现
export const updateBrokerageWithdraw = async (data: BrokerageWithdrawVO) => {
  return await request.put({ url: `/order/brokerage-withdraw/update`, data })
}

// 删除相亲佣金提现
export const deleteBrokerageWithdraw = async (id: number) => {
  return await request.delete({ url: `/order/brokerage-withdraw/delete?id=` + id })
}

// 导出相亲佣金提现 Excel
export const exportBrokerageWithdraw = async (params) => {
  return await request.download({ url: `/order/brokerage-withdraw/export-excel`, params })
}
